<template>
  <view :style="themeColor">
    <view class="page">
      <view class="flex flex-direction flex-wrap align-stretch benben-position-layout flex redemptDetails_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex flex-wrap align-center justify-between redemptDetails_fd0_0'>
          <view class='flex flex-wrap align-center redemptDetails_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back"
            data-url="1">
            <text class='fu-iconfont2  redemptDetails_fd0_0_c0_c0'>&#xE794;</text>
          </view>
          <view class='flex flex-wrap align-center'>
            <text class='redemptDetails_fd0_0_c1_c0'>订单详情</text>
          </view>
          <view class='flex align-center justify-end redemptDetails_fd0_0_c2'>
          </view>
        </view>

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
      <!---订单flex布局开始-->
      <view class="flex flex-direction align-stretch benben-flex-layout redemptDetails_flex_1">
        <view class='flex align-center justify-between redemptDetails_fd1_0'>
          <view class='flex flex-direction align-stretch redemptDetails_fd1_0_c0'>
            <text class='redemptDetails_fd1_0_c0_c0'>回收待接单</text>
            <text class='redemptDetails_fd1_0_c0_c1'>指定派单</text>
          </view>
          <image class='redemptDetails_fd1_0_c1' mode="aspectFit" :src='STATIC_URL+"7.png"'
            v-if="dataDetails.status=='0' && dataDetails.pay_type!='offline_pay'"></image>
          <image class='redemptDetails_fd1_0_c1_1' mode="aspectFit" :src='STATIC_URL+"41.png"'
            v-if="dataDetails.status=='1'"></image>
          <image class='redemptDetails_fd1_0_c1_1' mode="aspectFit" :src='STATIC_URL+"42.png"'
            v-if="dataDetails.status=='2'"></image>
          <image class='redemptDetails_fd1_0_c1_1' mode="aspectFit" :src='STATIC_URL+"43.png"'
            v-if="dataDetails.status=='3'"></image>
          <image class='redemptDetails_fd1_0_c1_1' mode="aspectFit" :src='STATIC_URL+"44.png"'
            v-if="dataDetails.status=='4'"></image>
          <image class='redemptDetails_fd1_0_c1_1' mode="aspectFit" :src='STATIC_URL+"45.png"'
            v-if="dataDetails.status=='7'"></image>
        </view>
        <view class='flex flex-direction flex-wrap align-stretch redemptDetails_fd1_1'>
          <view class='flex flex-wrap align-center justify-end redemptDetails_fd1_1_c0'>
            <text class='redemptDetails_fd1_1_c0_c0'>客户</text>
            <text>王先生</text>
          </view>
          <view class='flex flex-wrap align-center justify-end redemptDetails_fd1_1_c1'
            v-if="dataDetails.coupon_money!='0.00'">
            <text class='redemptDetails_fd1_1_c0_c0'>手机</text>
            <text class='redemptDetails_fd1_1_c1_c1'>18612341234</text>
          </view>
          <view class='flex flex-wrap align-center justify-end redemptDetails_fd1_1_c1'>
            <text class='redemptDetails_fd1_1_c0_c0'>型号</text>
            <text class='redemptDetails_fd1_1_c1_c1' v-if=" dataDetails.order_info.express_price>money">三元锂</text><text
              class='redemptDetails_fd1_1_c2_c1_1' v-if=" dataDetails.order_info.express_price==money">包邮</text>
          </view>
          <view class='flex flex-wrap align-center justify-end redemptDetails_fd1_1_c1'
            v-if=" dataDetails.discount_money>money">
            <text class='redemptDetails_fd1_1_c0_c0'>数量</text>
            <text class='redemptDetails_fd1_1_c1_c1'>{{dataDetails.discount_money}}</text>
          </view>
          <view class='flex flex-wrap align-center justify-end redemptDetails_fd1_1_c1'
            v-if=" dataDetails.discount_money>money">
            <text class='redemptDetails_fd1_1_c0_c0'>预约时间</text>
            <text class='redemptDetails_fd1_1_c1_c1'>{{dataDetails.discount_money}}</text>
          </view>
          <view class='flex flex-wrap align-center justify-end redemptDetails_fd1_1_c1'
            v-if=" dataDetails.discount_money>money">
            <text class='redemptDetails_fd1_1_c0_c0'>回收地点</text>
            <text class='redemptDetails_fd1_1_c5_c1'>{{dataDetails.discount_money}}</text>
          </view>
        </view>
        <view class='flex flex-direction flex-wrap align-stretch redemptDetails_fd1_2'>
          <view class='flex flex-wrap align-center redemptDetails_fd1_2_c0'>

            <view class='flex  redemptDetails_fd1_2_c0_c0'></view>

            <text class='redemptDetails_fd1_2_c0_c1'>订单信息</text>
          </view>
          <view class='flex flex-wrap align-stretch justify-between redemptDetails_fd1_2_c1'>
            <text class='redemptDetails_fd1_2_c1_c0'>订单编号</text>
            <view class='flex flex-wrap align-center'>
              <text class='redemptDetails_fd1_2_c1_c1_c0'>{{dataDetails.order_sn}}</text>
              <text class='redemptDetails_fd1_2_c1_c1_c1' @tap.stop="copyText(dataDetails.order_sn)">复制</text>
            </view>
          </view>
          <view class='flex flex-direction flex-wrap align-stretch'>
            <view class='flex flex-wrap align-center justify-between redemptDetails_fd1_2_c2_c0'>
              <text class='redemptDetails_fd1_2_c2_c0_c0'>下单时间</text>
              <text class='redemptDetails_fd1_2_c2_c0_c1'>{{dataDetails.create_time}}</text>
            </view>
          </view>
        </view>
        <view class='flex flex-wrap align-center justify-end redemptDetails_fd1_3'>
          <button class='redemptDetails_fd1_3_c0' v-if="dataDetails.btn_list.go_pay=='1'">接单</button><button
            class='redemptDetails_fd1_3_c0_1'
            v-if="dataDetails.btn_list.pay_balance=='1' && dataDetails.order_type=='7'">支付尾款</button>
          <button class='redemptDetails_fd1_3_c1' @tap.stop="confirmReceiptFunc()"
            v-if="dataDetails.btn_list.confirm_receive=='1'">联系客户</button><button class='redemptDetails_fd1_3_c0_1'
            v-if="dataDetails.btn_list.evaluate=='1'">评价</button>
        </view>
        <view class='flex flex-direction flex-wrap align-stretch redemptDetails_fd1_4'>
          <view class='flex flex-wrap align-center redemptDetails_fd1_2_c0'>

            <view class='flex  redemptDetails_fd1_2_c0_c0'></view>

            <text class='redemptDetails_fd1_2_c0_c1'>回收信息</text>
          </view>
          <view class='flex flex-wrap align-stretch justify-between redemptDetails_fd1_4_c1'>
            <text class='redemptDetails_fd1_4_c1_c0'>订单编号</text>
            <view class='flex flex-wrap align-center'>
              <benben-input class='redemptDetails_fd1_4_c1_c1_c0' type="text" :placeholder="`请输入`" confirm-type="done"
                :maxlength="-1" placeholder-style="color:#999;font-size:28rpx" />
              <text class='redemptDetails_fd1_4_c1_c1_c1'>KG</text>
            </view>
          </view>
          <view class='flex flex-direction flex-wrap align-stretch'>
            <view class='flex flex-wrap align-center justify-between redemptDetails_fd1_2_c2_c0'>
              <text class='redemptDetails_fd1_4_c2_c0_c0'>备注</text>
            </view>
          </view>
          <view class='flex flex-wrap redemptDetails_fd1_4_c3'>
            <textarea class='flex redemptDetails_input_fd1_4_c3' :placeholder="'输入备注信息'" :maxlength="240"
              :show-num='true' placeholder-style="color:#999;font-size:28rpx" v-model="fd1_4_c3" />
            <template>
              <view class='flex flex justify-end redemptDetails_numberfd1_4_c3_c0'>
                <text>{{fd1_4_c3.length}}</text>
                <text>/</text>
                <text>240</text>
              </view>
            </template>
          </view>
          <view class='flex flex-wrap align-stretch justify-between redemptDetails_fd1_4_c1'>
            <text class='redemptDetails_fd1_4_c1_c0'>完成时间</text>
            <view class='flex flex-wrap align-center'>
              <text class='redemptDetails_fd1_4_c1_c1_c1'>2020-09-28 21:12</text>
            </view>
          </view>
        </view>
      </view>

      <!---订单flex布局结束-->
      <benben-popup v-model="popupShow1706076633241" :mask="true" :mask-close-able="false" mode='center'>
        <!---删除弹窗flex布局开始-->
        <view class="flex flex-direction flex-wrap align-center redemptDetails_flex_2">
          <text class='redemptDetails_fd2_0'>提示</text>
          <text class='redemptDetails_fd2_1'>确定开始接单</text>
          <view class='flex flex-wrap align-center redemptDetails_fd2_2'>
            <button class='redemptDetails_fd2_2_c0'>取消</button>
            <button class='redemptDetails_fd2_2_c1'>确认</button>
          </view>
        </view>

        <!---删除弹窗flex布局结束-->

      </benben-popup>


    </view>
  </view>
</template>
<script>
  import {
    validate
  } from '@/common/utils/validate.js'

  export default {
    components: {},


    data() {
      return {
        "popupShow1706076633241": false,
        "fd1_4_c3": "",
        "cut": "1",
        "cancel_id": "",
        "dataDetails": {
          "aid": "",
          "order_sn": "",
          "order_money": "",
          "payable_money": "",
          "coupon_id": "",
          "coupon_money": "",
          "send_time": "",
          "receive_time": "",
          "pay_time": "",
          "discount_money": "",
          "create_time": "",
          "pay_type": "",
          "status": "",
          "pay_type_str": "",
          "order_info": {
            "receiver_mobile": "",
            "receiver_address": "",
            "receiver_name": "",
            "remark": "",
            "province": "",
            "city": "",
            "district": "",
            "sex": "",
            "label_name": "",
            "express_price": "",
            "pickup_code": "",
            "pickup_img": ""
          },
          "order_goods_list": [],
          "shop_info": {
            "aid": "",
            "store_name": "",
            "store_logo": "",
            "store_logo_id": ""
          },
          "btn_list": {
            "cancel_order": "",
            "go_pay": "",
            "remind_send": "",
            "remind_already": "",
            "apply_invoice": "",
            "view_invoice": "",
            "apply_refund": "",
            "view_logistics": "",
            "confirm_receive": "",
            "evaluate": "",
            "delete_order": "",
            "pay_balance": ""
          },
          "is_multiple_package": "",
          "order_type": "",
          "advance_sn": "",
          "usermerchant_id": "",
          "discount_str": "",
          "surplus_receive_time": "",
          "group_info": {
            "join_timeout": "",
            "activity_status": "",
            "group_members_nums": "",
            "join_number": "",
            "status_txt": ""
          },
          "group_user": [],
          "real_money": "",
          "cancel_surplus_second": "",
          "balance_payment_stime": "",
          "balance_payment_etime": "",
          "receive_surplus_time": "",
          "goods_total": "",
          "pay_status": "",
          "final_order_sn": "",
          "balance_money": ""
        },
        "dataMessage": [],
        "text": "shenqingchengg",
        "money": 0,
        "order_id": "1026",
        "order_sn": ""
      };
    },
    computed: {
      themeColor() {
        return this.$store.getters.themeColor
      },

    },
    watch: {},
    onLoad(options) {
      let {
        order_id,
        order_sn
      } = options
      if (order_id !== undefined) this.order_id = order_id
      if (order_sn !== undefined) this.order_sn = order_sn
    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {

    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      //删除订单
      async deleteOrderFunc() {
        //请求方法
        //数据验证

        let data65d178bee1e79 = await this.$api.post(global.apiUrls.post65d178bee1e79, {
          order_sn: this.order_id
        });

        if (data65d178bee1e79.data.code != 1) {
          this.$message.info(data65d178bee1e79.data.msg);
          return
        }



        this.$message.info('删除成功');
        uni.$emit('shenqingchengg', this.text)
        setTimeout(() => {
          this.$urouter.navigateBack(1);
        }, 500)
      },
      //订单-订单详情
      async getDetailFunc() {
        //请求方法
        //数据验证

        let datadataDetails = await this.$api.post(global.apiUrls.post62c92b9d5ada3, {
          order_id: this.order_id,
          order_type: '3'
        });

        if (datadataDetails.data.code != 1) {
          this.$message.info(datadataDetails.data.msg);
          return
        }
        let infodataDetails = datadataDetails.data;
        this.dataDetails = infodataDetails.data

      },
    }
  };
</script>
<style lang="scss" scoped>
  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: url(image-path('4.png')) no-repeat;
    background-size: 100% auto;
  }

  .redemptDetails_flex_0 {
    background: url(image-path('4.png')) no-repeat;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .redemptDetails_fd0_0_c2 {
    padding: 0rpx 0rpx 0rpx 0rpx;
    width: 200rpx;
  }

  .redemptDetails_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 600;
    color: #fff;
  }

  .redemptDetails_fd0_0_c0_c0 {
    font-size: 36rpx;
    color: #fff;
    font-weight: 500;
  }

  .redemptDetails_fd0_0_c0 {
    width: 200rpx;
  }

  .redemptDetails_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
    line-height: 88rpx;
  }

  .redemptDetails_flex_1 {
    padding: 5rpx 24rpx 32rpx 24rpx;
    margin: 0rpx 0rpx 88rpx 0rpx;
  }

  .redemptDetails_numberfd1_4_c3_c0 {
    width: 100%;
    font-size: 24rpx;
    color: var(--benbenFontColor0);
    line-height: 46rpx;
    font-weight: 400;
  }

  .redemptDetails_input_fd1_4_c3 {
    width: 100%;
    height: 140rpx;
    font-size: 28rpx;
    font-weight: 400;
    color: #333;
    white-space: pre-wrap;
  }

  .redemptDetails_fd1_4_c3 {
    background: #F8F9FD;
    width: 638rpx;
    border-radius: 10rpx 10rpx 10rpx 10rpx;
    padding: 10rpx 10rpx 0rpx 16rpx;
    margin: 12rpx auto 0rpx auto;
    height: 240rpx;
  }

  .redemptDetails_fd1_4_c2_c0_c0 {
    margin: 0rpx 72rpx 0rpx 0rpx;
    font-size: 28rpx;
    font-weight: 400;
    color: var(--benbenFontColor0);
  }

  .redemptDetails_fd1_4_c1_c1_c1 {
    margin: 0rpx 0rpx 0rpx 12rpx;
  }

  .redemptDetails_fd1_4_c1_c1_c0 {
    font-size: 28rpx;
    text-align: right;
  }

  .redemptDetails_fd1_4_c1_c0 {
    font-size: 28rpx;
    font-weight: 400;
    color: var(--benbenFontColor0);
  }

  .redemptDetails_fd1_4_c1 {
    line-height: 34rpx;
    margin: 32rpx 0rpx 0rpx 0rpx;
    font-size: 28rpx;
  }

  .redemptDetails_fd1_4 {
    background: #fff;
    background-size: 100% auto !important;
    border-radius: 16rpx 16rpx 16rpx 16rpx;
    padding: 32rpx 24rpx 32rpx 24rpx;
    margin: 0rpx 0rpx 100rpx 0rpx;
  }

  .redemptDetails_fd1_3_c1 {
    background: #F8F8F8;
    border-radius: 40rpx 40rpx 40rpx 40rpx;
    font-size: 24rpx;
    color: var(--benbenFontColor0);
    width: 184rpx;
    height: 64rpx;
    line-height: 64rpx;
    font-weight: 400;
    margin: 0rpx 0rpx 0rpx 24rpx;
  }

  .redemptDetails_fd1_3_c0_1 {
    background: var(--benbenbgColor7);
    border-radius: 40rpx 40rpx 40rpx 40rpx;
    font-size: 24rpx;
    color: #fff;
    width: 170rpx;
    height: 60rpx;
    line-height: 60rpx;
    font-weight: 400;
    margin: 0rpx 0rpx 0rpx 24rpx;
  }

  .redemptDetails_fd1_3_c0 {
    background: rgba(16, 51, 126, 1);
    border-radius: 40rpx 40rpx 40rpx 40rpx;
    font-size: 24rpx;
    color: #fff;
    width: 170rpx;
    height: 60rpx;
    line-height: 60rpx;
    font-weight: 400;
    margin: 0rpx 0rpx 0rpx 24rpx;
  }

  .redemptDetails_fd1_3 {
    background: #FFF;
    background-size: 100% auto !important;
    position: fixed;
    bottom: calc(0rpx + var(--window-bottom));
    width: 750rpx;
    height: 88rpx;
    left: 0rpx;
    padding: 0rpx 24rpx 0rpx 24rpx;
  }

  .redemptDetails_fd1_2_c2_c0_c1 {
    font-size: 24rpx;
    font-weight: 400;
    color: #333333;
  }

  .redemptDetails_fd1_2_c2_c0_c0 {
    margin: 0rpx 72rpx 0rpx 0rpx;
    font-size: 28rpx;
    font-weight: 400;
    color: #999999;
  }

  .redemptDetails_fd1_2_c2_c0 {
    margin: 32rpx 0rpx 0rpx 0rpx;
  }

  .redemptDetails_fd1_2_c1_c1_c1 {
    border: 1px solid #10337E;
    background: #FFFFFF;
    font-size: 22rpx;
    font-weight: 400;
    color: var(--benbenFontColor4);
    border-radius: 16rpx 16rpx 16rpx 16rpx;
    padding: 1rpx 6rpx 1rpx 6rpx;
  }

  .redemptDetails_fd1_2_c1_c1_c0 {
    font-size: 24rpx;
    font-weight: 400;
    color: #333333;
    margin: 0rpx 43rpx 0rpx 72rpx;
    -webkit-line-clamp: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
  }

  .redemptDetails_fd1_2_c1_c0 {
    font-size: 28rpx;
    font-weight: 400;
    color: #999999;
  }

  .redemptDetails_fd1_2_c1 {
    line-height: 34rpx;
    margin: 32rpx 0rpx 0rpx 0rpx;
  }

  .redemptDetails_fd1_2_c0_c1 {
    font-size: 32rpx;
    font-weight: 500;
    color: #333333;
  }

  .redemptDetails_fd1_2_c0_c0 {
    background: rgba(16, 51, 126, 1);
    width: 6rpx;
    height: 30rpx;
    margin: 0rpx 15rpx 0rpx 0rpx;
    transform: scaleX(0.5);
  }

  .redemptDetails_fd1_2_c0 {
    border-bottom: 1px solid #eee;
    padding: 0rpx 0rpx 24rpx 0rpx;
    margin: 0rpx 0rpx 0rpx 0rpx;
  }

  .redemptDetails_fd1_2 {
    background: #fff;
    background-size: 100% auto !important;
    border-radius: 16rpx 16rpx 16rpx 16rpx;
    padding: 32rpx 24rpx 32rpx 24rpx;
    margin: 12rpx 0rpx 24rpx 0rpx;
  }

  .redemptDetails_fd1_1_c5_c1 {
    font-size: 28rpx;
    color: #333333;
    line-height: 42rpx;
    text-align: right;
  }

  .redemptDetails_fd1_1_c2_c1_1 {
    font-size: 28rpx;
    font-weight: 700;
    color: #333333;
    line-height: 42rpx;
  }

  .redemptDetails_fd1_1_c1_c1 {
    font-size: 28rpx;
    color: #333333;
    line-height: 42rpx;
  }

  .redemptDetails_fd1_1_c1 {
    margin: 0rpx 0rpx 32rpx 0rpx;
  }

  .redemptDetails_fd1_1_c0_c0 {
    font-size: 28rpx;
    font-weight: 500;
    color: #333333;
    margin: 0rpx auto 0rpx 0rpx;
  }

  .redemptDetails_fd1_1_c0 {
    margin: 32rpx 0rpx 32rpx 0rpx;
  }

  .redemptDetails_fd1_1 {
    background: #fff;
    border-radius: 16rpx 16rpx 16rpx 16rpx;
    background-size: 100% auto !important;
    margin: 12rpx 0rpx 12rpx 0rpx;
    padding: 0rpx 24rpx 0rpx 24rpx;
  }

  .redemptDetails_fd1_0_c1_1 {
    width: 140rpx;
    height: 140rpx;
  }

  .redemptDetails_fd1_0_c1 {
    width: 80rpx;
    height: 80rpx;
  }

  .redemptDetails_fd1_0_c0_c1 {
    font-size: 24rpx;
    margin: 12rpx 0rpx 0rpx 0rpx;
  }

  .redemptDetails_fd1_0_c0_c0 {
    font-size: 32rpx;
    font-weight: 600;
  }

  .redemptDetails_fd1_0_c0 {
    color: var(--benbenFontColor3);
  }

  .redemptDetails_fd1_0 {
    padding: 12rpx 0rpx 0rpx 0rpx;
  }

  .redemptDetails_flex_2 {
    background: #fff;
    width: 540rpx;
    border-radius: 16rpx 16rpx 16rpx 16rpx;
  }

  .redemptDetails_fd2_2_c1 {
    border-top: 1px solid #eee;
    border-left: 1px solid #eee;
    background: #fff;
    line-height: 110rpx;
    border-radius: 0rpx 0rpx 16rpx 0rpx;
    font-size: 32rpx;
    color: rgba(16, 51, 126, 1);
    font-weight: 500;
    width: 270rpx;
  }

  .redemptDetails_fd2_2_c0 {
    border-top: 1px solid #eee;
    background: #fff;
    line-height: 110rpx;
    border-radius: 0rpx 0rpx 0rpx 16rpx;
    font-size: 32rpx;
    color: rgba(153, 153, 153, 1);
    font-weight: 500;
    width: 270rpx;
  }

  .redemptDetails_fd2_2 {
    margin: 37rpx 0rpx 0rpx 0rpx;
  }

  .redemptDetails_fd2_1 {
    line-height: 52rpx;
    font-size: 32rpx;
    font-weight: 400;
    color: #333333;
    margin: 0rpx 32rpx 0rpx 32rpx;
    text-align: center;
  }

  .redemptDetails_fd2_0 {
    font-size: 36rpx;
    font-weight: 700;
    line-height: 32rpx;
    color: #333333;
    margin: 40rpx 0rpx 40rpx 0rpx;
  }
</style>
